// Line class - line element for scene - draws and manages a line in the scene
ResponsiveLine.prototype = new Line();  
ResponsiveLine.prototype.constructor=ResponsiveLine;
function ResponsiveLine(x, y, w, h){
	this.percentagePosition = {x:x,y:y,w:w,h:h};
	
	this.addedToScene = function(scene){		
		scene.domUtils.addEventSimple(scene.canvas,"onresize", this.updateRectangle);
		this.updateRectangle();
		this.updateBoundary(this.x-1,this.y-1,this.w+2,this.h+2);
	}
	this.updateRectangle = function(){
		if(!this.scene)return;
		var sceneSize = scene.getSize();
		this.x = sceneSize.w * this.percentagePosition.x / 100;
		this.y = sceneSize.h * this.percentagePosition.y / 100;
		this.w = sceneSize.w * this.percentagePosition.w / 100;
		this.h = sceneSize.h * this.percentagePosition.h / 100;		
	}
}
